# 导包
import unittest
from script.test01_reg import TestLoginRegAPI

from script.test03_login_params import TestLoginAPI
import app
from lib.HTMLTestRunner_PY3 import HTMLTestRunner

# 组装测试套件suite
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestLoginRegAPI))
suite.addTest(unittest.makeSuite(TestLoginAPI))

# 指定报告名称及路径
report = app.BASE_DIR + "/report/report.html"

# 打开文件流
with open(report, "wb") as f:
    # 创建runner
    runner = HTMLTestRunner(f, title="P2P API Test Report.")
    # 运行suite
    runner.run(suite)

